Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store registration yaml in installed system #71

Merged

Conversation

davidcassany
Copy link
Contributor

@davidcassany davidcassany commented Jul 21, 2022

This PR ensures the bare minimum configuration to call elemental-operator register from the installed system is stored to the installed system during the installation.

On installed system calling elemental-operator register /oem/registration will rerun the registration process without applying any change on the current system (no installation neither cloud-config download). Can be used to apply labels to machine inventories and similar operations.

Related to rancher/elemental-cli#284 and #63

Signed-off-by: David Cassany [email protected]

@codecov-commenter
Copy link

Codecov Report

Merging #71 (8abe9a7) into main (e15e76e) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #71   +/-   ##
=======================================
  Coverage   29.74%   29.74%           
=======================================
  Files           5        5           
  Lines         353      353           
=======================================
  Hits          105      105           
  Misses        244      244           
  Partials        4        4           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e15e76e...8abe9a7. Read the comment docs.

Copy link
Contributor

@Itxaka Itxaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but if its only for the labels, shouldnt we just integrate that as part of the registration? we should have all the info needed to add labels already no? And the machineInventory should already be created? I think we should explore that afterwards but this works for now 👍

@fgiudici
Copy link
Member

Looks good, but if its only for the labels, shouldnt we just integrate that as part of the registration? we should have all the info needed to add labels already no? And the machineInventory should already be created? I think we should explore that afterwards but this works for now +1

Yeah, I think the more general question is: the elemental-operator is just for installing the system or should be available after the install (e.g., for labels)?
But sure, if we need to call it after-install, we need to store the Registration URL and ca-cert.

Copy link
Member

@fgiudici fgiudici left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@davidcassany
Copy link
Contributor Author

You both are right indeed, it is not completely clear to me if it makes much sense running elemental-operator register beyond the installation use case, however it is currently handy in our manual tests, at least, to add labels into the machine inventory.

@davidcassany davidcassany merged commit 52c3cbb into main Jul 21, 2022
@davidcassany davidcassany deleted the store_registarion_config_yaml_in_installed_system branch July 21, 2022 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants